<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML xmlns:v="urn:schemas-microsoft-com:vml">

<head>
    <meta charset="UTF-8">
    <title>星座轮盘|新浪星座</title>

    <link href="astrolabe.css" rel="stylesheet" type="text/css" />
    <script>
        try {
            document.domain = "sina.com.cn";
        } catch (e) {}
    </script>
</head>

<body>
    <div class="main_wrapper">
        <div class="calendar" style="height:60px;">
            <div class="date">
                <div class="day" id="dayC">16</div>
                <div class="month" id="monthC">12</div>
                <script>
                    (function () {
                        var date = new Date();
                        var day = date.getDate();
                        var month = date.getMonth() + 1;
                        document.getElementById('dayC').innerHTML = day;
                        document.getElementById('monthC').innerHTML = month + '月';
                    })()
                </script>
            </div>
            <ul class="warn">
                <li class="fit clearfix"><span>宜</span>
                    <h3><a href="http://astro.sina.com.cn/hdrl/index.d.html?date=2015-11-18" target="_blank">合帐 裁衣 嫁娶 安床</a></h3></li>
                <li class="notfit clearfix"><span>忌</span>
                    <h3><a href="http://astro.sina.com.cn/hdrl/index.d.html?date=2015-11-18" target="_blank">置产 造船 开光 掘井</a></h3></li>
            </ul>
        </div>

        <div class="roulette">
            <div class="roulette_type">
                <ul>
                    <li data-index="0"><a href="javascript:;">每日</a></li>
                    <li data-index="1"><a href="javascript:;">明日</a></li>
                    <li data-index="2"><a href="javascript:;">每周</a></li>
                    <li data-index="3"><a href="javascript:;">每月</a></li>
                    <li data-index="4"><a href="javascript:;">每年</a></li>
                    <li data-index="5"><a href="javascript:;">爱情</a></li>
                </ul>
            </div>
            <div class="roulette_content">
                <div class="roulette_bg"></div>
                <div class="roulette_handler">
                    <img src="http://i1.sinaimg.cn/ast/hqj/0819/images/0704_astro_zyc_zodiacMask.gif" width="225" height="225" alt="" usemap="#rouletteMap" hidefocus="true" />
                    <map name="rouletteMap" id="rouletteMap">
                        <area date-name="Aquarius" shape="poly" coords="59,16,97,82,84,92,19,52,40,31" href="http://mix.sina.com.cn/astro/view.php?file=&flag=1&prourl=10" alt='水瓶' data-index="0" target="_blank" />
                        <area date-name="Capricorn" shape="poly" coords="114,7,112,78,98,79,61,15,85,5,103,3" href="http://mix.sina.com.cn/astro/view.php?file=&flag=1&prourl=9" alt='摩羯' data-index="1" target="_blank" />
                        <area date-name="Sagittarius" shape="poly" coords="168,16,127,83,115,76,114,3,144,4" href="http://mix.sina.com.cn/astro/view.php?file=&flag=1&prourl=8" alt='射手' data-index="2" target="_blank" />
                        <area date-name="Scorpio" shape="poly" coords="205,56,132,98,124,89,167,17,190,32" href="http://mix.sina.com.cn/astro/view.php?file=&flag=1&prourl=7" alt='天蝎' data-index="3" target="_blank" />
                        <area date-name="Libra" shape="poly" coords="213,108,128,108,127,100,204,57,215,78,218,99" href="http://mix.sina.com.cn/astro/view.php?file=&flag=1&prourl=6" alt="天秤" data-index="4" target="_blank" />
                        <area date-name="Virgo" shape="poly" coords="204,164,128,118,128,109,213,109,219,129,212,151" href="http://mix.sina.com.cn/astro/view.php?file=&flag=1&prourl=5" alt='处女' data-index="5" target="_blank" />
                        <area date-name="leo" shape="poly" coords="165,203,121,122,127,117,204,167,187,191" href="http://mix.sina.com.cn/astro/view.php?file=&flag=1&prourl=4" alt='狮子' data-index="6" target="_blank" />
                        <area date-name="Cancer" shape="poly" coords="111,212,113,129,120,125,165,202,133,215" href="http://mix.sina.com.cn/astro/view.php?file=&flag=1&prourl=3" alt='巨蟹' data-index="7" target="_blank" />
                        <area date-name="Gemini" shape="poly" coords="109,213,111,130,104,127,59,202,70,209,94,216" href="http://mix.sina.com.cn/astro/view.php?file=&flag=1&prourl=2" alt='双子' data-index="8" target="_blank" />
                        <area date-name="Taurus" shape="poly" coords="57,201,102,126,94,118,16,162,28,181,45,197" href="http://mix.sina.com.cn/astro/view.php?file=&flag=1&prourl=1" alt='金牛' data-index="9" target="_blank" />
                        <area date-name="Aries" shape="poly" coords="16,159,94,118,92,107,3,110,8,139" href="http://mix.sina.com.cn/astro/view.php?file=&flag=1&prourl=0" alt='白羊' data-index="10" target="_blank" />
                        <area date-name="Pisces" shape="poly" coords="5,107,86,106,83,91,19,54,7,81" href="http://mix.sina.com.cn/astro/view.php?file=&flag=1&prourl=11" alt='双鱼' data-index="11" target="_blank" />
                    </map>
                </div>
                <div class="roulette_center"><a href="http://product.astro.sina.com.cn/swe" target="_blank">查看</br>星盘</a></div>
            </div>
        </div>

        <div class="zodiac">
            <form target='_parent'>
                <select id="zodiacSel1" class="zodiac_sel">
                    <option value='sxys' selected>2015年生肖运势</option>
                    <option value='sxlyy'>流月运势</option>
                </select>
                <select id="zodiacSel2" class="zodiac_sel">
                    <option value="shu">鼠</option>
                    <option value="niu">牛</option>
                    <option value="hu">虎</option>
                    <option value="tu">兔</option>
                    <option value="long">龙</option>
                    <option value="she">蛇</option>
                    <option value="ma">马</option>
                    <option value="yang">羊</option>
                    <option value="hou">猴</option>
                    <option value="ji">鸡</option>
                    <option value="gou">狗</option>
                    <option value="zhu">猪</option>
                </select>
                <input type="hidden" name="sss" value="" id="sxy">
                <input type="button" class="search" value="查询" id="sxyInput" />
            </form>
        </div>
        <script type="text/javascript">
            //生肖运势
            var sxy1 = document.getElementById('zodiacSel1'),
                sxy2 = document.getElementById('zodiacSel2'),
                sxy = document.getElementById('sxy'),
                arr101 = sxy.value.split("_");
            for (var i = 0; i < sxy1.options.length; i++) {
                if (sxy1.options[i].value == arr101[0]) {
                    sxy1.options[i].selected = true;


                }
            };
            for (var i = 0; i < sxy2.options.length; i++) {
                if (sxy2.options[i].value == arr101[0]) {
                    sxy2.options[i].selected = true;
                }
            };

            function onChange101() {
                sxy.value = sxy1.value + '/index.d.html?zodiac=' + sxy2.value;

            }
            sxy1.onchange = onChange101;
            sxy2.onchange = onChange101;
            var sxyInput = document.getElementById("sxyInput");
            sxyInput.onclick = function () {
                parent.location.href = "http://astro.sina.com.cn/res/" + sxy1.value + "/index.d.html?zodiac=" + sxy2.value
            }
        </script>
        <a class="taluo" target="_parent" href='http://astro.sina.com.cn/pc/taluo.html'>塔罗运势占卜</a>

        <script type="text/javascript">
            ;
            (function () {
                function _addEvent(el, type, fn) {
                    var arr, i, o, v, _i, _j, _k, _l, _len, _len1, _len2, _len3, _results, _results1, _results2, _results3;
                    arr = type.replace(/\s+/g, " ").replace(/^\s+|\s+$/g, "").split(" ");
                    if (document.addEventListener) {
                        if (el instanceof Array) {
                            _results = [];
                            for (i = _i = 0, _len = el.length; _i < _len; i = ++_i) {
                                o = el[i];
                                _results.push((function () {
                                    var _j, _len1, _results1;
                                    _results1 = [];
                                    for (_j = 0, _len1 = arr.length; _j < _len1; _j++) {
                                        v = arr[_j];
                                        _results1.push(o.addEventListener(v, fn, false));
                                    }
                                    return _results1;
                                })());
                            }
                            return _results;
                        } else {
                            _results1 = [];
                            for (_j = 0, _len1 = arr.length; _j < _len1; _j++) {
                                v = arr[_j];
                                _results1.push(el.addEventListener(v, fn, false));
                            }
                            return _results1;
                        }
                    } else {
                        if (el instanceof Array) {
                            _results2 = [];
                            for (i = _k = 0, _len2 = el.length; _k < _len2; i = ++_k) {
                                o = el[i];
                                _results2.push((function () {
                                    var _l, _len3, _results3;
                                    _results3 = [];
                                    for (_l = 0, _len3 = arr.length; _l < _len3; _l++) {
                                        v = arr[_l];
                                        _results3.push(o.attachEvent("on" + v, fn));
                                    }
                                    return _results3;
                                })());
                            }
                            return _results2;
                        } else {
                            _results3 = [];
                            for (_l = 0, _len3 = arr.length; _l < _len3; _l++) {
                                v = arr[_l];
                                _results3.push(el.attachEvent("on" + v, fn));
                            }
                            return _results3;
                        }
                    }
                }

                function _byClass(cls, root, tag) {
                    var arr, els, i, j, o1, o2, _i, _j, _len, _len1, _ref;
                    if (root == null) {
                        root = document.body;
                    }
                    if (tag == null) {
                        tag = '*';
                    }
                    root = typeof root === 'string' ? document.getElementById(root) : root;
                    arr = [];
                    if (!root) {
                        return arr;
                    }
                    els = root.getElementsByTagName(tag);
                    for (i = _i = 0, _len = els.length; _i < _len; i = ++_i) {
                        o1 = els[i];
                        _ref = o1.className.split(" ");
                        for (j = _j = 0, _len1 = _ref.length; _j < _len1; j = ++_j) {
                            o2 = _ref[j];
                            if (o2 === cls) {
                                arr.push(o1);
                                break;
                            }
                        }
                    }
                    return arr;
                }

                function _hasClass(el, cls) {
                    var reg;
                    reg = new RegExp("(^|\\s)" + cls + "($|\\s)");
                    return reg.test(el.className);
                }

                function _removeClass(el, cls) {
                    var reg;
                    reg = new RegExp("(^|\\s)" + cls + "($|\\s)", "g");
                    return el.className = el.className.replace(reg, '');
                }

                function _addClass(el, cls) {
                    if (!_hasClass(el, cls)) {
                        return el.className += " " + cls;
                    }
                }
                // 星座查询参数
                var FILE_ARRAY = [
				'fate_day', //每日
				'fate_tomorrow', //明日
				'fate_week', //每周
				'fate_month', //每月
				'fate_year', //每年
				'fate_year_love', //爱情
			];

                // 绑定星盘类型切换事件
                var changeHref = (function () {
                    var elArr = document.getElementById("rouletteMap").getElementsByTagName('area');

                    return function (typeIndex) {
                        for (var i = 0, len = elArr.length; i < len; i++) {
                            var el = elArr[i];

                            var str = "http://astro.sina.com.cn/" + FILE_ARRAY[+typeIndex] + "_" + el.getAttribute("date-name") + "/index.html";

                            el.setAttribute("href", str);
                        }
                    }
                })();

                var changeType = (function () {
                    var curTypeEl = null;

                    return function (el) {
                        curTypeEl && _removeClass(curTypeEl, 'selected');
                        curTypeEl = el.parentNode;
                        _addClass(curTypeEl, 'selected');

                        changeHref(curTypeEl.getAttribute("data-index"));
                    }
                })();

                var rouletteType = _byClass("roulette_type", null, "div")[0];

                _addEvent(rouletteType, "click", function (e) {
                    var e = e || window.event,
                        src = e.target || e.srcElement;

                    if (src.nodeName.toLowerCase() === 'a') {
                        changeType(src);
                    }
                });

                changeType(rouletteType.getElementsByTagName("li")[0].getElementsByTagName("a")[0]);
                // 绑定星盘事件 
                var rouletteBg = _byClass("roulette_bg", null, null)[0],
                    rouletteMap = document.getElementById("rouletteMap");
                _addEvent(rouletteMap, "mouseover", function (e) {
                    var e = e || window.event,
                        src = e.target || e.srcElement;
                    if (src.nodeName.toLowerCase() === 'area') {
                        _addClass(rouletteBg, 'roulette_bg_' + src.getAttribute('data-index'));
                    }
                });
                _addEvent(rouletteMap, "mouseout", function (e) {
                    var e = e || window.event,
                        src = e.target || e.srcElement;
                    if (src.nodeName.toLowerCase() === 'area') {
                        _removeClass(rouletteBg, 'roulette_bg_' + src.getAttribute('data-index'));
                    }
                });
            })();
        </script>

        <!--生肖滚动条 -->
        <script type="text/javascript">
            function DivSelect(id, divId, className) {
                this.id = id;
                this.divId = divId;
                this.divClassName = className || 'selectView';
                this.ele = this.$(this.id);
                if (!this.ele) {
                    return
                };
                var that = this;
                this.status = "close";
                this.parentObj = this.ele.parentNode;
                while (this.readStyle(this.parentObj, "display") != "block") {
                    if (this.parentObj.parentNode) {
                        this.parentObj = this.parentObj.parentNode
                    } else {
                        break
                    }
                };
                this.parentObj.style.position = "relative";
                var sp = this.absPosition(this.ele, this.parentObj);
                this.ele.style.visibility = "hidden";
                this.__div = document.createElement("div");
                if (divId) {
                    this.__div.id = divId
                };
                if (this.divClassName) {
                    this.__div.className = this.divClassName
                };
                this.parentObj.appendChild(this.__div);
                this.__div.style.width = this.ele.offsetWidth + "px";
                this.__div.style.position = "absolute";
                this.__div.style.left = sp.left + "px";
                this.__div.style.top = sp.top + "px";
                this.__div.onclick = function () {
                    that.click()
                };
                this.__div_count = document.createElement("div");
                this.__div.appendChild(this.__div_count);
                this.__div_count.className = "ds_cont";
                this.__div_title = document.createElement("div");
                this.__div_count.appendChild(this.__div_title);
                this.__div_title.className = "ds_title";
                this.__div_button = document.createElement("div");
                this.__div_count.appendChild(this.__div_button);
                this.__div_button.className = "ds_button";
                this.__div_list = document.createElement("div");
                this.__div.appendChild(this.__div_list);
                this.__div_list.className = "ds_list";
                this.__div_list.style.display = "none";
                this.__div_listCont = document.createElement("div");
                this.__div_list.appendChild(this.__div_listCont);
                this.__div_listCont.className = "dsl_cont";
                this.list = [];
                var temp;
                for (var i = 0; i < this.ele.options.length; i++) {
                    temp = document.createElement("p");
                    this.list.push(temp);
                    this.__div_listCont.appendChild(temp);
                    temp.innerHTML = this.ele.options[i].innerHTML;
                    if (this.ele.selectedIndex == i) {
                        this.__div_title.innerHTML = temp.innerHTML
                    };
                    temp.num = i;
                    temp.onmouseover = function () {
                        that.showSelectIndex(this.num)
                    };
                    temp.onclick = function () {
                        that.select(this.innerHTML)
                    }
                }
            };
            DivSelect.prototype = {
                showSelectIndex: function (num) {
                    if (typeof (num) === 'undefined') {
                        num = this.ele.selectedIndex
                    };
                    if (typeof (this.showIndex) !== 'undefined') {
                        this.list[this.showIndex].className = ''
                    };
                    this.showIndex = num;
                    this.list[this.showIndex].className = 'selected'
                },
                select: function (txt) {
                    for (var i = 0; i < this.ele.options.length; i++) {
                        if (this.ele.options[i].innerHTML == txt) {
                            this.ele.selectedIndex = i;
                            if (this.ele.onchange) {
                                this.ele.onchange()
                            };
                            this.__div_title.innerHTML = txt;
                            break
                        }
                    }
                },
                setIndex: function (num) {
                    if (num < 0 || num >= this.list.length) {
                        return
                    }
                    this.ele.selectedIndex = num;
                    if (this.ele.onchange) {
                        this.ele.onchange()
                    };
                    this.__div_title.innerHTML = this.list[num].innerHTML
                },
                clickClose: function (e) {
                    var thisObj = e.target ? e.target : event.srcElement;
                    var that = this;
                    do {
                        if (thisObj == that.__div) {
                            return
                        };
                        if (thisObj.tagName == "BODY") {
                            break
                        };
                        thisObj = thisObj.parentNode
                    } while (thisObj.parentNode);
                    that.close()
                },
                keyDown: function (e) {
                    var num = this.showIndex;
                    if (e.keyCode == 38) {
                        num--;
                        if (num < 0) {
                            num = this.list.length - 1
                        };
                        this.showSelectIndex(num);
                        this.stopDefault(e)
                    };
                    if (e.keyCode == 40) {
                        num++;
                        if (num >= this.list.length) {
                            num = 0
                        };
                        this.showSelectIndex(num);
                        this.stopDefault(e)
                    };
                    if (e.keyCode == 13 || e.keyCode == 9) {
                        this.setIndex(num);
                        this.stopDefault(e);
                        this.close()
                    };
                    if (e.keyCode == 27) {
                        this.close()
                    }
                },
                open: function () {
                    var that = this;
                    this.showSelectIndex();
                    this.__div_list.style.display = "block";
                    this.status = "open";
                    this.__closeFn = function (e) {
                        that.clickClose(e)
                    };
                    this.__keyFn = function (e) {
                        that.keyDown(e)
                    };
                    this.addEvent(document, "click", this.__closeFn);
                    this.addEvent(document, "keydown", this.__keyFn)
                },
                close: function () {
                    var that = this;
                    this.__div_list.style.display = "none";
                    this.status = "close";
                    this.delEvent(document, "click", this.__closeFn);
                    this.delEvent(document, "keydown", this.__keyFn)
                },
                click: function () {
                    if (this.status == "open") {
                        this.close()
                    } else {
                        this.open()
                    }
                },
                $: function (objName) {
                    if (document.getElementById) {
                        return eval('document.getElementById("' + objName + '")')
                    } else {
                        return eval('document.all.' + objName)
                    }
                },
                addEvent: function (obj, eventType, func) {
                    if (obj.attachEvent) {
                        obj.attachEvent("on" + eventType, func)
                    } else {
                        obj.addEventListener(eventType, func, false)
                    }
                },
                delEvent: function (obj, eventType, func) {
                    if (obj.detachEvent) {
                        obj.detachEvent("on" + eventType, func)
                    } else {
                        obj.removeEventListener(eventType, func, false)
                    }
                },
                readStyle: function (i, I) {
                    if (i.style[I]) {
                        return i.style[I]
                    } else if (i.currentStyle) {
                        return i.currentStyle[I]
                    } else if (document.defaultView && document.defaultView.getComputedStyle) {
                        var l = document.defaultView.getComputedStyle(i, null);
                        return l.getPropertyValue(I)
                    } else {
                        return null
                    }
                },
                absPosition: function (obj, parentObj) {
                    var left = obj.offsetLeft;
                    var top = obj.offsetTop;
                    var tempObj = obj.offsetParent;
                    var sss = "";
                    try {
                        while (tempObj.id != document.body && tempObj.id != document.documentElement && tempObj != parentObj && tempObj != null) {
                            sss += tempObj.tagName + " , ";
                            tempObj = tempObj.offsetParent;
                            left += tempObj.offsetLeft;
                            top += tempObj.offsetTop
                        }
                    } catch (e) {};
                    return {
                        left: left,
                        top: top
                    }
                },
                stopDefault: function (e) {
                    if (e.preventDefault) {
                        e.preventDefault()
                    } else {
                        e.returnValue = false
                    }
                }
            };

            new DivSelect('zodiacSel1');
            new DivSelect('zodiacSel2');
        </script>

    </div>
</body>

</html>